import React from "react";

import _Form from './Form'
import Field from "./Field";
import useForm from "./useForm";

interface IForm {
  children: any
  Field: any
  useForm: any
  [props: string]: any
}

interface IFoo extends React.ForwardRefExoticComponent<Pick<IForm, keyof IForm> & React.RefAttributes<unknown>> {
  Field: any
  useForm: any
  children: any
}

const Form = React.forwardRef(_Form) as IFoo

Form.Field = Field
Form.useForm = useForm

export {
  Field,
  useForm,
  Form
}

export default Form